import cv2
import os

def combine(pics):
    im1 = cv2.imread(pics[0])
    im2 = cv2.imread(pics[1])
    im3 = cv2.imread(pics[2])
    im4 = cv2.imread(pics[3])
    imv1 = cv2.vconcat([im1,im3])
    imv2 = cv2.vconcat([im2,im4])
    final = cv2.hconcat([imv1, imv2])
    cv2.imwrite("four.jpg", final)

pics = [5,6,7,9]
files = []
for item in pics:
    files.append(f"tips_3_resize/图片_{item}.jpg")

combine(files)